package io.ukoko.entity;

import java.util.List;

/**
 * 映射数据库menu菜单表
 */
public class Menu {
    /**
     * 菜单ID
     */
    private Integer  id;
    /**
     * 菜单标题
     */
    private String title;
    /**
     * 菜单图标
     */
    private String icon;
    /**
     * 菜单类型 0: 目录 1: 菜单
     */
    private Integer type;
    /**
     * 当 type 为 1 时，openType 生效，_iframe 正常打开 _blank 新建浏览器标签页
     */
    private String openType;
    /**
     * 菜单类型下访问的页面
     */
    private String href="";
    /**
     * 父ID
     */
    private Integer parentId=0;
    /**
     * 子菜单
     */
    private List<Menu> children;

    public Menu() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getOpenType() {
        return openType;
    }

    public void setOpenType(String openType) {
        this.openType = openType;
    }

    public String getHref() {
        return href;
    }

    public void setHref(String href) {
        this.href = href;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public List<Menu> getChildren() {
        return children;
    }

    public void setChildren(List<Menu> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return "Menu{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", icon='" + icon + '\'' +
                ", type=" + type +
                ", openType='" + openType + '\'' +
                ", href='" + href + '\'' +
                ", parentId=" + parentId +
                ", children=" + children +
                '}';
    }
}
